//
//  CustomerNavigationBar.m
//  DepressionAuxiliary
//
//  Created by ZhenYu Wang on 2022/6/15.
//

#import "CustomerNavigationBar.h"

@implementation CustomerNavigationBar

- (void)layoutSubviews {
    [super layoutSubviews];
    if (@available(iOS 13.0, *)) {
        for (UIView *subview in self.subviews) {
            if ([NSStringFromClass(subview.class) containsString:@"_UINavigationBarContentView"]) {
                subview.frame = CGRectMake(-subview.layoutMargins.left, subview.frame.origin.y, subview.frame.size.width + subview.layoutMargins.left + subview.layoutMargins.right, subview.frame.size.height);
                break;
            }
        }
    } else {
        for (UIView *subview in self.subviews) {
            if ([NSStringFromClass(subview.class) containsString:@"ContentView"]) {
                subview.layoutMargins = UIEdgeInsetsZero;
                break;
            }
        }
    }
}


@end
